package com.tarena.lbs.basic.web.rpc;

import com.tarena.lbs.basic.api.UserApi;
import com.tarena.lbs.basic.web.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserApiImpl implements UserApi {
    @Autowired
    private UserService userService;

    @Override
    public boolean isUserGroup(Integer userId, Integer groupId) {
        try{
            return userService.isUserGroup(userId,groupId);
        }catch (Exception e){
            log.error("判断用户所属人群 失败");
        }
        return false;
    }
}
